package com.test.manager.controller;


import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.test.db.api.UserDao;
import com.test.manager.service.MyService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author luojian
 * <p>
 * Description: 用户相关控制器
 * </p>
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserDao userDao;
    /**
     * 获取登录用户信息
     *
     * @return UserVO
     */
    @GetMapping("/info")
    public JSONObject info() {
        return JSONUtil.parseObj(userDao.getInfo());
    }

}
